package priv.yiyuan.example.design.proxy;

/**
 * 支付宝支付
 * <p>
 * 策略模式-具体策略
 *
 * @author YiYuan
 * @data 2025/9/25
 * @apoNote
 */
public class AlipayPaymentStrategy implements PaymentStrategy {

    private String userId;

    public AlipayPaymentStrategy(String userId) {
        this.userId = userId;
    }

    @Override
    public void pay(double amount) {

        System.out.println("[支付宝支付策略] 正在使用支付宝账户 " + userId + " 支付 " + amount + " 元。");
        System.out.println("[支付宝支付策略] 支付成功。");

    }
}
